// Decompiled by Jad v1.5.8f. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   PatrocinantesPersistor.java

package org.fiel.persistence;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.logging.Log;
import org.fiel.commons.jdbc.Persistor;
import org.fiel.domain.Patrocinante;

public class PatrocinantesPersistor extends Persistor
{

    public PatrocinantesPersistor()
    {
    }

    protected Object extract(ResultSet rs)
    {
        try
        {
            Patrocinante patrocinante = new Patrocinante();
            patrocinante.setId(Integer.getInteger(rs.getString("id")));
            patrocinante.setDescripcion(rs.getString("descripcion"));
            return patrocinante;
        }
        catch(Throwable e)
        {
            Persistor.logger.error(e.getMessage());
        }
        return null;
    }

    protected List getFields()
    {
        ArrayList ls = new ArrayList();
        ls.add("id");
        ls.add("descripcion");
        return ls;
    }

    protected List getOrderByFields()
    {
        ArrayList ls = new ArrayList();
        ls.add("descripcion asc");
        return ls;
    }

    protected String getTableNames()
    {
        return "patrocinantes";
    }
}
